[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
String_Field
Purpose Assigns a string variable to an input field.
Decln. String_Field(ID:byte;var Svar:string;Fmt:string);
Remarks ID is the field ID number.
Save is the name of the string variable that will be updated with
the user's input.
Fmt is the format of the Input string. The following characters
denote input characters:
# allow 0..9,'.',,'-', and 'e' for scientific.
@ only letters of the alphabet and punctuation.
* any damn character the user can find.
! all letters converted to upper case.
For example, a format for a telephone number might be "(###) ###-
####".
The length of the field is dictated by the Fmt string.
Example
VAR
NAME, TEL : STRING;
ZIP : LONGINT;
BEGIN
NAME := '';
TEL := '';
ZIP := 0;
STRING_FIELD(1,NAME,'!!!!!!!!!!!!!!!!!!!!');
STRING_FIELD(2,TEL,'(###) ###-####');
LONGINT_FIELD(3,ZIP,'',0,99999);
END;
The Name field will force all the user's input to upper case. The Telephone
field will only accept numbers and the cursor will jump between the #
characters (although they won't show as #'s on the display!!). The Zip
field will accept any number in the range 0 to 99999.
See Also:
Add_Field
Byte_Field
Word_Field
Integer_Field
LongInt_Field
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson